var con = require("../../../utils/data.js");
var app = getApp();
Page({
  data: {
    artItem: []
  },
  onLoad: function (options) {
    var id = options.id;
    var that = this; 
    var oneData = [
      { "id": "17", "wxappid": "6", "info": "装修啦", "img": "http://ow1m1usz0.bkt.clouddn.com/jzdz_banner_04.jpg", "url": "测试地址" }, 
    { "id": "18", "wxappid": "6", "info": "专修", "img": "http://ow1m1usz0.bkt.clouddn.com/jzdz_banner_02.jpg", "url": "测试地址" }, 
    { "id": "19", "wxappid": "6", "info": "地方", "img": "http://ow1m1usz0.bkt.clouddn.com/jzdz_banner_03.jpg", "url": "测试地址" }, 
    { "id": "20", "wxappid": "6", "info": "1231", "img": "http://www.weiyunyi.com/Uploads/20170714/596875b286885.png", "url": "测试地址" }];

  that.setData({
    list: oneData
  });
 

  var twoData = [
    { id: 1, info: [
      { "id": "6", "wxappid": "6", "typeid": "5", "title": "实木套装门", "text": "一般是指以实木作为主材，外压贴中密度板作为平衡层，以国产或进口天然木皮作为饰面", "details": "", "createtime": "2017-07-17", "img": "http://ow1m1usz0.bkt.clouddn.com/jzdz-%E5%AE%9E%E6%9C%A8%E5%A5%97%E8%A3%85%E9%97%A81.jpg?imageView2/1/w/750/h/350/format/jpg/interlace/0/q/100|watermark/2/text/6YOR5Lyg5piOMTM4ODIwNTU2NjI=/font/5a6L5L2T/fontsize/1100/fill/I0VGRUZFRg==/dissolve/92/gravity/Center", "toppic": "20170715/5969673bd509c.jpg" }
      ,{ "id": "7", "wxappid": "6", "typeid": "5", "title": "高分子套装门", "text": "高分子门是以进口高分子材料作为主材，外压贴中密度板作为平衡层", "details": "", "createtime": "2017-07-15", "img": "http://ow1m1usz0.bkt.clouddn.com/jzdz-%E9%AB%98%E5%88%86%E5%AD%90%E5%A5%97%E8%A3%85%E9%97%A83.jpg?imageView2/1/w/750/h/350/format/jpg/interlace/0/q/100|watermark/2/text/6YOR5Lyg5piOMTM4ODIwNTU2NjI=/font/5a6L5L2T/fontsize/1100/fill/I0VGRUZFRg==/dissolve/92/gravity/Center", "toppic": "20170715/596967b0ec79a.jpg" }
      , { "id": "8", "wxappid": "6", "typeid": "5", "title": "PVC套装门", "text": "木塑门 的主要原料是PVC树脂和优质木粉,PVC树脂采用医用级", "details": "", "createtime": "2017-07-15", "img": "http://ow1m1usz0.bkt.clouddn.com/jzdz-PVC%E5%A5%97%E8%A3%85%E9%97%A81.jpg?imageView2/1/w/750/h/350/format/jpg/interlace/0/q/100|watermark/2/text/6YOR5Lyg5piOMTM4ODIwNTU2NjI=/font/5a6L5L2T/fontsize/1100/fill/I0VGRUZFRg==/dissolve/92/gravity/Center", "toppic": "20170715/596967b0ec79a.jpg" }
      , { "id": "9", "wxappid": "6", "typeid": "5", "title": "强化复合套装门", "text": "强化木门，也叫强化生态门、烤漆门、室内防火烤漆门", "details": "", "createtime": "2017-07-15", "img": "http://ow1m1usz0.bkt.clouddn.com/jzdz-%E5%BC%BA%E5%8C%96%E5%A4%8D%E5%90%88%E5%A5%97%E8%A3%85%E9%97%A84.jpg?imageView2/1/w/750/h/350/format/jpg/interlace/0/q/100|watermark/2/text/6YOR5Lyg5piOMTM4ODIwNTU2NjI=/font/5a6L5L2T/fontsize/1100/fill/I0VGRUZFRg==/dissolve/92/gravity/Center", "toppic": "20170715/596967b0ec79a.jpg" }
      , { "id": "10", "wxappid": "6", "typeid": "5", "title": "林顿牌木质套装门", "text": "门框采用实木指接材为框架，门芯为各种填充材料", "details": "", "createtime": "2017-07-15", "img": "http://ow1m1usz0.bkt.clouddn.com/jzdz-%E5%BC%BA%E5%8C%96%E5%A4%8D%E5%90%88%E5%A5%97%E8%A3%85%E9%97%A84.jpg?imageView2/1/w/750/h/350/format/jpg/interlace/0/q/100|watermark/2/text/6YOR5Lyg5piOMTM4ODIwNTU2NjI=/font/5a6L5L2T/fontsize/1100/fill/I0VGRUZFRg==/dissolve/92/gravity/Center", "toppic": "20170715/596967b0ec79a.jpg" }
      , { "id": "11", "wxappid": "6", "typeid": "5", "title": "甲级防盗门", "text": "门框采用实木指接材为框架，门芯为各种填充材料", "details": "", "createtime": "2017-07-15", "img": "http://ow1m1usz0.bkt.clouddn.com/jzdz-%E7%94%B2%E7%BA%A7%E9%98%B2%E7%9B%97%E9%97%A82.jpg?imageView2/1/w/750/h/350/format/jpg/interlace/0/q/100|watermark/2/text/6YOR5Lyg5piOMTM4ODIwNTU2NjI=/font/5a6L5L2T/fontsize/1100/fill/I0VGRUZFRg==/dissolve/92/gravity/Center", "toppic": "20170715/596967b0ec79a.jpg" }
      , { "id": "12", "wxappid": "6", "typeid": "5", "title": "非标门", "text": "提供各种非标准尺寸的各种类型的防盗门、套装门、别墅大门", "details": "", "createtime": "2017-07-15", "img": "http://ow1m1usz0.bkt.clouddn.com/jzdz-%E9%9D%9E%E6%A0%87%E9%97%A82.jpg?imageView2/1/w/750/h/350/format/jpg/interlace/0/q/100|watermark/2/text/6YOR5Lyg5piOMTM4ODIwNTU2NjI=/font/5a6L5L2T/fontsize/1100/fill/I0VGRUZFRg==/dissolve/92/gravity/Center", "toppic": "20170715/596967b0ec79a.jpg" }
      ]},



    { id: 2, info: [
      { "id": "13", "wxappid": "6", "typeid": "5", "title": "平开门", "text": "由门套，合页，门扇，锁等组成", "details": "", "createtime": "2017-07-17", "img": "http://ow1m1usz0.bkt.clouddn.com/jzdz-%E5%B9%B3%E5%BC%80%E9%97%A81.jpg?imageView2/1/w/750/h/350/format/jpg/interlace/0/q/100|watermark/2/text/6YOR5Lyg5piOMTM4ODIwNTU2NjI=/font/5a6L5L2T/fontsize/1100/fill/I0VGRUZFRg==/dissolve/92/gravity/Center", "toppic": "20170715/5969673bd509c.jpg" }
      , { "id": "14", "wxappid": "6", "typeid": "5", "title": "吊躺门", "text": "一种采用上吊轮支撑滑动的门，这种门开启时无噪音、无门槛，美观，大方", "details": "", "createtime": "2017-07-15", "img": "http://ow1m1usz0.bkt.clouddn.com/jzdz-%E5%90%8A%E8%BA%BA%E9%97%A81.jpg?imageView2/1/w/750/h/350/format/jpg/interlace/0/q/100|watermark/2/text/6YOR5Lyg5piOMTM4ODIwNTU2NjI=/font/5a6L5L2T/fontsize/1100/fill/I0VGRUZFRg==/dissolve/92/gravity/Center", "toppic": "20170715/596967b0ec79a.jpg" }
      , { "id": "15", "wxappid": "6", "typeid": "5", "title": "小折叠门", "text": "多扇折叠，可推移到侧边，占空间较少。分有轨式折叠门和无轨式折叠门两种。", "details": "", "createtime": "2017-07-15", "img": "http://ow1m1usz0.bkt.clouddn.com/jzdz-%E5%B0%8F%E6%8A%98%E5%8F%A0%E9%97%A81.jpg?imageView2/1/w/750/h/350/format/jpg/interlace/0/q/100|watermark/2/text/6YOR5Lyg5piOMTM4ODIwNTU2NjI=/font/5a6L5L2T/fontsize/1100/fill/I0VGRUZFRg==/dissolve/92/gravity/Center", "toppic": "20170715/596967b0ec79a.jpg" }
      , { "id": "16", "wxappid": "6", "typeid": "5", "title": "大折叠门", "text": "主要适用于车间、商场、办公楼、展示厅和家庭装潢等场所的隔断用途", "details": "", "createtime": "2017-07-15", "img": "http://ow1m1usz0.bkt.clouddn.com/jzdz-%E5%A4%A7%E6%8A%98%E5%8F%A0%E9%97%A81.jpg?imageView2/1/w/750/h/350/format/jpg/interlace/0/q/100|watermark/2/text/6YOR5Lyg5piOMTM4ODIwNTU2NjI=/font/5a6L5L2T/fontsize/1100/fill/I0VGRUZFRg==/dissolve/92/gravity/Center", "toppic": "20170715/596967b0ec79a.jpg" }
      , { "id": "17", "wxappid": "6", "typeid": "5", "title": "隔断门", "text": "对分开的两个空间起到驳合、引导和过渡的作用；是连接空间的纽带", "details": "", "createtime": "2017-07-15", "img": "http://ow1m1usz0.bkt.clouddn.com/jzdz-%E9%9A%94%E6%96%AD%E9%97%A81.jpg?imageView2/1/w/750/h/350/format/jpg/interlace/0/q/100|watermark/2/text/6YOR5Lyg5piOMTM4ODIwNTU2NjI=/font/5a6L5L2T/fontsize/1100/fill/I0VGRUZFRg==/dissolve/92/gravity/Center", "toppic": "20170715/596967b0ec79a.jpg" }
      ] },


    { id: 3, info: [
      { "id": "18", "wxappid": "6", "typeid": "5", "title": "整体衣柜", "text": "没有最好，只有更好，用我们的专业打动每一个客户,最适合的价钱", "details": "", "createtime": "2017-07-17", "img": "http://ow1m1usz0.bkt.clouddn.com/jzdz-%E6%95%B4%E4%BD%93%E8%A1%A3%E6%9F%9C1.jpg?imageView2/1/w/750/h/350/format/jpg/interlace/0/q/100|watermark/2/text/6YOR5Lyg5piOMTM4ODIwNTU2NjI=/font/5a6L5L2T/fontsize/1100/fill/I0VGRUZFRg==/dissolve/92/gravity/Center", "toppic": "20170715/5969673bd509c.jpg" }
      , { "id": "19", "wxappid": "6", "typeid": "5", "title": "衣柜门", "text": "衣柜门 各种隔断门 ，真材实料来自我们的匠心制造", "details": "", "createtime": "2017-07-15", "img": "http://ow1m1usz0.bkt.clouddn.com/jzdz-%E8%A1%A3%E6%9F%9C%E9%97%A81.jpg?imageView2/1/w/750/h/350/format/jpg/interlace/0/q/100|watermark/2/text/6YOR5Lyg5piOMTM4ODIwNTU2NjI=/font/5a6L5L2T/fontsize/1100/fill/I0VGRUZFRg==/dissolve/92/gravity/Center", "toppic": "20170715/596967b0ec79a.jpg" }
      , { "id": "20", "wxappid": "6", "typeid": "5", "title": "衣帽间", "text": "可自定义的衣帽间，各种DIY,发挥你的无尽想象", "details": "", "createtime": "2017-07-15", "img": "http://ow1m1usz0.bkt.clouddn.com/jzdz-%E8%A1%A3%E5%B8%BD%E9%97%B4.jpg?imageView2/1/w/750/h/350/format/jpg/interlace/0/q/100|watermark/2/text/6YOR5Lyg5piOMTM4ODIwNTU2NjI=/font/5a6L5L2T/fontsize/1100/fill/I0VGRUZFRg==/dissolve/92/gravity/Center", "toppic": "20170715/596967b0ec79a.jpg" }
      ] },


    { id: 4, info: [
      { "id": "21", "wxappid": "6", "typeid": "5", "title": "美味醪糟", "text": "又叫酒酿，甜酒，酸酒，旧时叫“醴”，江南地区特色传统小吃。", "details": "", "createtime": "2017-07-17", "img": "http://ow1m1usz0.bkt.clouddn.com/jzdz_lz_t6.jpg", "toppic": "http://ow1m1usz0.bkt.clouddn.com/jzdz_lz_t6.jpg" }
      , { "id": "22", "wxappid": "6", "typeid": "5", "title": "美味醪糟", "text": "因为我们你将更实惠,因为我们你将得到更好的服务,更高的质量", "details": "", "createtime": "2017-07-15", "img": "http://ow1m1usz0.bkt.clouddn.com/jzdz_lz_t6.jpg", "toppic": "20170715/596967b0ec79a.jpg" }
      ] }


  ];
 
     var c_id = Number(id);
     var c_cData;
     for (var i = 0; i<twoData.length;i++){
       if(twoData[i].id==c_id){
         c_cData = twoData[i].info;break;
       }
     }
  console.log("为您加载的id="+id+"的数据");
  that.setData({
    artItem: c_cData
  });


  },
  bindcarbookD: function (e) {
    var len = e.currentTarget.dataset.id;
    wx.navigateTo({
      url: 'articleD/articleD?id=' + len
    })
  },
  onShareAppMessage: function (res) {

    if (res.from === 'button') {
      // 来自页面内转发按钮
      console.log(res.target)
    }
    return {
      title: this.data.DefaultData.details.details_subject,
      path: '/pages/Home',
      success: function (res) {
        // 转发成功
        console.log("转发已经成功");
      },
      fail: function (res) {
        console.log("转发已经失败");
      }
    }
  },
})








